﻿package kit4j.notepad.log;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MethodInvokeAroundAdvice implements MethodInterceptor {

	public Object invoke(MethodInvocation invocation) throws Throwable {
		System.out.println("[Into Method]: "
				+ invocation.getMethod().getDeclaringClass() + "#"
				+ invocation.getMethod().getName());

		Object value = invocation.proceed();

		System.out.println("[Return Method]: "
				+ invocation.getMethod().getDeclaringClass() + "#"
				+ invocation.getMethod().getName());
		
		return value;
	}

}
